@extends('layout.app')
@section('title','Редактирование центра')
@section('content')

    <div class="mt-10">
    <form action="{{ route('centers.update', $center->id) }}" method="POST" class="grid grid-cols-1 gap-[30px] max-w-[600px]">
        @csrf
        @method('PATCH')
        <div>
            <textarea type="text" name="name"  class="w-full shadow-sky-200 shadow p-[20px] rounded-[10px]" placeholder="Название" >{{ $center->name }}</textarea>
            @error('name')
            <div>
                {{ $message }}
            </div>
            @enderror
        </div>

        <div>
            <input type="text" name="phone"  class="w-full shadow-sky-200 shadow p-[20px] rounded-[10px]" placeholder="Телефон" value="{{ $center->phone }}">
            @error('phone')
            <div>
                {{ $message }}
            </div>
            @enderror
        </div>
        <div>
            <input type="text" name="site"  class="w-full shadow-sky-200 shadow p-[20px] rounded-[10px]" placeholder="Сайт" value="{{ $center->site }}">
            @error('site')
            <div>
                {{ $message }}
            </div>
            @enderror
        </div>

        <div>
            <input type="text" name="address"  class="w-full shadow-sky-200 shadow p-[20px] rounded-[10px]" placeholder="Адрес" value="{{ $center->address }}">
            @error('address')
            <div>
                {{ $message }}
            </div>
            @enderror
        </div>

        <div>
            <textarea name="notation"  class="w-full shadow-sky-200 shadow p-[20px] rounded-[10px]" placeholder="Описание">{{ $center->notation }} </textarea>
            @error('notation')
            <div>
                {{ $message }}
            </div>
            @enderror
        </div>

        <input type="submit" value="Обновить" class="bg-blue-700 p-4 text-white font-bold">
    </form>
    </div>
@endsection
